package edu.snake.core.model.arena;


import edu.snake.core.model.character.Character;
import edu.snake.implement.model.arena.Direction;

import java.util.Iterator;
import java.util.List;
import java.util.concurrent.locks.Lock;

public interface Arena {


    public int getWidth();

    public int getHeight();

    public Lock getLock();

    public void set(Position position, Character character);

    public Character move(Position position, Character character);

    public Character move(Direction direction, Character character);

    public Character get(Position position);

    public Position get(Character character);

    public Character remove(Position position);

    public Position remove(Character character);

    public boolean checkFreeSpace();

    public List<Position> freeSpaceList();

    public Position calculateNeighboringFreePosition(Position position);

    public boolean checkArenaBorder(Position position);

    public Iterator<Position> iterator();
}
